#include <iostream>
using namespace std;

/*
    多重继承父类的构造调用规则
      构造函数调用顺序：多个父类从左到右调用
      析构函数调用顺序：多个父类从右到左调用
*/

class Catamount
{
public:
    Catamount()
    {
        cout << "catamount" << endl;
    }
    ~Catamount()
    {
        cout << "~catamount" << endl;
    }
};

class Mammal
{
public:
    Mammal()
    {
        cout << "mammal" << endl;
    }
    ~Mammal()
    {
        cout << "~mammal" << endl;
    }
};

class Cat : public Catamount, public Mammal
{
public:
    Cat()
    {
        cout << "cat" << endl;
    }
    ~Cat()
    {
        cout << "~cat" << endl;
    }
};

int main()
{
    Cat cat;
    return 0;
}